<h1>Reuniones con el director</h1>

<table>
	<tr>
		<th>Alumno</th>
		<th>Fecha</th>
		<th colspan="3"></th>
	</tr>
	<%if @reunions.size == 0 then %>
		<tr><td>No hubo reuniones</td></tr>	
	<%else%>
		<%n=0%>
		<% for reunion in @reunions %>
		<%n+=1%>
		  <tr class="row<%=n%2%>">
		  	<td><%=  link_to h(reunion.alumno.nombre_completo), :action=>'show', :controller=>'alumnos', :id=>reunion.alumno%></td>
		  	<td><%=h reunion.fecha.strftime(DATETIME_FMT)%></td>
		    <td><%=  link_to 'Detalles', :action => 'show', :id => reunion %></td>
		    <td><%=  link_to 'Editar', :action => 'edit', :id => reunion %></td>
		    <td><%=  link_to 'Eliminar', { :action => 'destroy', :id => reunion }, :confirm => 'Are you sure?', :method => :post %></td>
		  </tr>
		<% end %>
	<% end %>
</table>

P&aacute;gina: <%=  (link_to '1', :page=> 1) if (@lnk_from!=1)%>
<%=  '...' if @lnk_from>2%>
<% @pn = @lnk_from %>
<% while @pn <= @lnk_to %>
	<%if @pn == @page then%>
		<%= @page%>
	<%else%>
		<%=  link_to @pn, { :page => @pn } %>
	<%end%>
	<% @pn +=1 %>
<% end %>
<%=  '...' if @lnk_to < @reunion_pages.last.number-1%>
<%=  (link_to @reunion_pages.last.number, :page=> @reunion_pages.last) if (@lnk_to!=@reunion_pages.last.number) %><br>
<br />

<%=  link_to 'Registrar reunion', :action => 'new' %>
